#include<bits/stdc++.h>
#define int long long 

using namespace std;

signed main() {
	int a, b, c, d;
	cin >> a >> b >> c >> d;
	bool flag1 = false;
	bool flag2 = false;
	if(d % 2 == 0) {
		flag1 = 1;
	}
	if(c % 2 == 0 || (a % 2 == 0 && b != 0 )) {
		flag2 = true;
	}
	 
	
	if( (flag1 == true && flag2 == true )|| (flag1 == false && flag2 == false)) {
		cout << "NO" << endl;
		return 0;
	}
	cout << "YES" << endl;
	return 0;
}

